﻿#pragma once
#include "stdafx.h"
#include "../Utilities/utilities.h"
#include "Vertex.h"
#include "Shaders.h"
#include "Texture.h"

class Model
{
private:
	int m_NumIndices;		// Number of Indices
	int m_NumVertices;		// Number of Vertices
	int m_IdTexture;		// Id Texture for Model
	
	
public:	
	
	GLuint VBO;				// VBO on Array Buffer
	GLuint IND;				// IND on Element Buffer

	Vector3 m_Rotate, m_Position, m_Scale;		// Rotation, Position and Scale of Model
	Model();	
	Model(Vertex* vd, int numVer, unsigned short* id, int numInd);	// Constructer Model - create memory in gl buffer

	///Set vertices
	//Input Parameters:
	//	vertices: Vertices data
	//	iCount: Vertex number
	///End
	void SetVertices(Vertex* vertices, int iCount);

	///Set indices
	//Input Parameters:
	//	indices: Indices data of vertices
	//	iCount: Indices number
	///End
	void SetIndices(unsigned short* indices, int iCount);

	~Model(void);
	Matrix getWorld();
	Matrix getInvertWorld();
	void draw(Shaders* shaders);		// draw model with Shader of Entity
	// Set Properties
	void setTextureID(GLuint id);
	
	// Get Properties
	
	GLuint getTextureID();
	int getNumIndices();
	int getNumVertices();
};
